var express = require('express')
var router = express.Router()

router.get('/', (req, res) => res.send('Hello World!'))

// define the about route
router.get('/about', function (req, res) {
    res.send('About birds')
})

router.post('/create', function (req, res) {
    var name = req.body.name
    var age = req.body.age
    var resultData = {
        code: 200,
        msg: '成功',
        name: name,
        age: age
    }
    res.send(resultData)
})
module.exports = router